
package com.e885.util.web;

import javax.servlet.http.HttpServletRequest;

/**
 * about any path util
 * 
 * @author Eric.Kao(gau168.gau@msa.hinet.net)
 * @version 1.0
 * @company E885 Group
 * @copyright Copyright (c) 2001-2008
 */

public class PathUtil
{
	/**
	 * 取得 jsp base url, 大部份是給 <base> 使用
	 * 
	 * @param request
	 * @return
	 */
	public static String getBasePath( HttpServletRequest request )
	{
		return request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
	}
}
